﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Micronet.OpenWeb.Com.BLL;
using Micronet.OpenWeb.Data;
using Micronet.OpenWeb.Entity;
using Micronet.OpenWeb.Utils;

namespace Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality
{
    public partial class HomeProfileProjectEdit : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)


        {

         

            if ("ID".OwQsIsExist())
            {
                HomeProfileProjectDv.DefaultMode = DetailsViewMode.Edit;
            }
            else
            {
                HomeProfileProjectDv.DefaultMode = DetailsViewMode.Insert;

            }
            HomeProfileProjectOds.Inserted += new ObjectDataSourceStatusEventHandler(HomeProfileProjectOds_Inserted);
            HomeProfileProjectOds.Deleted += new ObjectDataSourceStatusEventHandler(HomeProfileProjectOds_Deleted   );
            HomeProfileProjectOds.Updated += new ObjectDataSourceStatusEventHandler(HomeProfileProjectOds_Updated);
        }

        void HomeProfileProjectOds_Updated(object sender, ObjectDataSourceStatusEventArgs e)
        {
            Response.Redirect("HomeProfileProjectAdmin.aspx");
        }

        void HomeProfileProjectOds_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
        {
            Response.Redirect("HomeProfileProjectAdmin.aspx");

        }

        void HomeProfileProjectOds_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
        {
            Response.Redirect("HomeProfileProjectAdmin.aspx");

        }
    }
}